//
//  CellForWHTStoryThreeModel.m
//  WZLProduct
//
//  Created by dllo on 16/3/28.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "CellForWHTStoryThreeModel.h"

@interface CellForWHTStoryThreeModel ()
@property (nonatomic, strong) UIView *separatorViewTop; /**< 自定义分割线Top */
@property (nonatomic, strong) UIView *separatorViewbottom; /**< 自定义分割线bottom */
@end

@implementation CellForWHTStoryThreeModel



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = [UIColor cyanColor];
        
        self.separatorViewTop = [[UIView alloc] init];
        [self.contentView addSubview:self.separatorViewTop];
        self.separatorViewTop.backgroundColor = [UIColor grayColor];
        [self.separatorViewTop mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView);
            make.left.equalTo(self.contentView).with.offset(10);
            make.right.equalTo(self.contentView).with.offset(-10);
            make.height.mas_equalTo(1);
        }];
 
        self.storyBySomeOne = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.storyBySomeOne];
        self.storyBySomeOne.backgroundColor = [UIColor orangeColor];
        self.storyBySomeOne.tintColor = [UIColor lightGrayColor];
        self.storyBySomeOne.titleLabel.font = FONT13;
        [self.storyBySomeOne setTitle:@"📷 故事收录于xxxx" forState:UIControlStateNormal];
        self.storyBySomeOne.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
        [self.storyBySomeOne mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.contentView.mas_centerY).with.offset(-10);
            make.left.equalTo(self.separatorViewTop);
            make.right.equalTo(self.separatorViewTop);
            make.height.mas_equalTo(20);
        }];
        
        self.storyDate = [[UILabel alloc] init];
        [self.contentView addSubview:self.storyDate];
         self.storyDate.font = FONT13;
        self.storyDate.textColor = [UIColor lightGrayColor];
        self.storyDate.text = @"⌚️ 2016.03.03.11:11";
        [self.storyDate mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(self.storyBySomeOne);
            make.top.equalTo(self.storyBySomeOne.mas_bottom);
            make.left.equalTo(self.storyBySomeOne);
        }];
        
        
        
        self.separatorViewbottom = [[UIView alloc] init];
        [self.contentView addSubview:self.separatorViewbottom];
        self.separatorViewbottom.backgroundColor = [UIColor grayColor];
        [self.separatorViewbottom mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.contentView);
            make.left.equalTo(self.contentView).with.offset(10);
            make.right.equalTo(self.contentView).with.offset(-10);
            make.height.mas_equalTo(1);
        }];
        
    }
    return self;
}


@end
